Raid decoding architecture with reduced bandwidth

ABSTRACT

A RAID decoding system which performs a Built in Self-Test (BIST) includes: a RAID decoder, including: a storage, for storing a syndrome of a first Reed-Solomon (RS) codeword, a syndrome of a second RS codeword, and parity data of the first RS codeword and the second RS codeword; and an RS decoder which performs decoding on the first RS codeword and the second RS codeword according to the parity data to generate an updated syndrome of the first RS codeword and an updated syndrome of the second RS codeword. A MUX inputs the first and the second RS codeword to the RS decoder in a first iteration, and inputs the parity data to the RS decoder in following iterations for updating the syndromes of the first and the second RS codeword. The updated syndromes are used to perform error correction on the first RS codeword and the second RS codeword.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 15/073,665, which was filed on Mar. 18, 2016, thecontents of which are included herein by reference.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to error correcting code (ECC) technology,and more particularly, to a RAID ECC with a reduced bandwidth.

2. Description of the Prior Art

Flash memory is a high performance, low power, non-volatile storageoften used in portable devices. A disadvantage of Flash memory is thatthe cells slowly deteriorate over time meaning the accuracy of a heldcharge will also decrease. At some point, errors associated with theheld charge cannot be corrected, and the cell becomes unusable.

Error Correcting Code (ECC) technology can extend the lifetime of a cellby locating and correcting errors associated with the held charges. Oneexample of an ECC code is low-density parity check (LDPC) decoding,which is a powerful form of ECC technology. Even LDPC codes, however,have a certain probability of failing at a particular Raw Error Bitrate. In cases where a valid codeword cannot be found via LDPC coding,secondary ECC solutions can be provided which detect/correct errors thatcannot be remedied by LDPC alone. One example is an encoding RAID check.

RAID is a virtual architecture which combines multiple disk drivecomponents into a single logical unit. By striping codes across multipledisks, mirroring codes in a single disk to generate codes in anotherdisk, and including parity symbols, valid codewords can be retrieved.RAID level 6 uses Reed-Solomon (RS) codes, each code consisting of2-byte symbols. Data is written to multiple drives with doubledistributed parity, i.e. two parity blocks are distributed across allmember disks. If an LDPC decoder cannot recover a valid codeword, theRAID parity can be used as the secondary ECC.

Data is RAID encoded by being segmented into many chunks and having RAIDparity (Reed-Solomon codes) added. The RAID data is then input to anLDPC encoder, and stored in a Flash memory, from where it can be outputto an LDPC decoder. After LDPC decoding, if a codeword fails (i.e. LDPCECC is insufficient to recover correct data), RAID decoding is performedby inputting the non-valid codeword into a RAID engine, and inputtingthe RAID parity data to generate a syndrome. After a certain number ofiterations, the syndrome should satisfy the matrix equations, i.e. itshould equal zero. At this point, the original data can be recovered viathe updated syndrome.

The drawbacks to the above method are that the RAID engine needs to beable to store an entire codeword, and that parity data of 64 bits(corresponding to four RS symbols) must be inputted to the RAID decoderin each iteration, which occupies a large bandwidth.

SUMMARY OF THE INVENTION

It is therefore an aim of the present invention to provide a Built inSelf-Test (BIST) which can save on the bandwidth and storage spacerequired for a RAID decoding engine.

The present invention therefore provides a RAID decoding system whichperforms a Built in Self-Test (BIST), the RAID decoding systemcomprising: a RAID decoder, comprising: a storage, for storing asyndrome of a first Reed-Solomon (RS) codeword, a syndrome of a secondRS codeword, parity data of the first RS codeword and parity data of thesecond RS codeword; and an RS decoder which stores the first RS codewordand the second RS codeword, and performs decoding on the first RScodeword and the second RS codeword according to the parity data togenerate an updated syndrome of the first RS codeword and an updatedsyndrome of the second RS codeword. The RAID decoding system furthercomprises a MUX, coupled between the storage and the RS decoder, forinputting the first RS codeword and the second RS codeword to the RSdecoder in a first iteration, and for inputting the parity data of thefirst RS codeword and the parity data of the second codeword to the RSdecoder in following iterations for respectively updating the syndromeof the first RS codeword and the syndrome of the second RS codeword. Theupdated syndrome of the first RS codeword and the updated syndrome ofthe second RS codeword are used to perform error correction on the firstRS codeword and the second RS codeword. The updated syndromes of thefirst RS codeword and the updated syndrome of the second RS codeword areused to perform error correction on the first RS codeword and the secondRS codeword when the updated syndrome of the first RS codeword and theupdated syndrome of the second RS codeword both equal zero.

The RS decoder comprises: a first RS decoder for storing the first RScodeword and for performing decoding on the first RS codeword accordingto the parity data to generate an updated syndrome of the first RScodeword; and a second RS decoder for storing the second RS codeword andfor performing decoding on the second RS codeword according to theparity data to generate an updated syndrome of the second RS codeword.

The RAID decoding system further comprises: an Error Insertion block forinserting errors into a first Reed-Solomon (RS) codeword and a second RScodeword; a Random Number Generator, for generating data to the ErrorInsertion block; a SEED pool, coupled between the Error Insertion blockand the Random Number Generator, for storing values corresponding to thefirst RS codeword and the second RS codeword with errors inserted, andusing those values to control the Random Number Generator to generatethe first RS codeword with errors inserted and the second RS codewordwith errors inserted when the updated syndrome of the first RS codewordand the updated syndrome of the second RS codeword both equal zero; anda Result Check block, coupled to the Random Number Generator and theRAID decoder, for receiving the first RS codeword with errors insertedand the second RS codeword with errors inserted and the error-correctedfirst RS codeword and the error-corrected second RS codeword, anddetermining correctness of the data.

In an embodiment of the present invention, the second RS codeword is amirror of the first RS codeword so that parity data of the first RScodeword is equal to the parity data of the second RS codeword, and thestorage only stores the parity data of one of the first RS codeword andthe second RS codeword, and further stores one of the first RS codewordwith errors and the second RS codeword with errors. The MUX inputs theparity data of the first RS codeword and the parity data of the secondcodeword to the first RS decoder and second RS decoder by mirroring theparity data stored in the storage.

These and other objectives of the present invention will no doubt becomeobvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment that isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of a RAID encoding system according to the relatedart.

FIG. 2 is a diagram of a RAID decoding system according to a firstembodiment of the present invention.

FIG. 3 is a diagram of a RAID decoder of the RAID decoding system shownin FIG. 2.

FIG. 4 is a diagram of the RAID decoding system shown in FIG. 2performing a result check operation.

FIG. 5 is a diagram of a RAID decoding system according to a secondembodiment of the present invention.

FIG. 6 is a diagram of a RAID decoder of the RAID decoding system shownin FIG. 5.

DETAILED DESCRIPTION

The invention provides two embodiments for providing a functional BISTwhich can perform RAID decoding with a decreased bandwidth as comparedto the prior arts.

As detailed in the background, during RAID encoding, data is segmentedinto chunks and RAID parity is added using Reed-Solomon codes. This isillustrated in FIG. 1, which shows a RAID encoding system 100. Thesystem 100 consists of a Random Number Generator 110 and a RAID encoder150. In RAID 6, a bandwidth of four RS symbols is used for the encoding,wherein each RS symbol is 2 bytes of data. Therefore, each chunk iscoded using 64 bits of data. The data is generated by the Random NumberGenerator 110, which generates 32 bits of striped data that is thenmirrored to create the four RS symbols. These 64 bits of data are theninput to the RAID encoder 150 to generate the parity data. As the 64bits of data are generated by mirroring 32 bits of originally generateddata, the parity data can also be generated by mirroring.

A Built-In Self-Test (BIST) enables a system to calibrate its decodingengine by determining that error correction is performed accurately. Ina standard BIST, errors are deliberately inserted into the datagenerated by the Random Number Generator. After decoding is performed,the resultant data can be examined to determine whether the error-freecodeword can be recovered, as the exact location and value of the errorsis known.

In a prior art BIST, codewords with errors are input and stored in aRAID decoder. Parity data is input to the RAID decoding engine fromoutside to generate and update syndromes of the codewords, which canthen be used to correct the data. The RAID decoding engine thereforeneeds to store both the corrected codeword and the original codewordwith errors. The aim of the embodiments of the present invention is toreduce the bandwidth and required storage of the BIST.

FIG. 2 illustrates a RAID decoding system 200 according to a firstexemplary embodiment of the invention. The RAID decoding system 200comprises a Random Number Generator 210, an Error Insertion block 220, aSEED pool 230, and a RAID decoder 250. The RAID decoder 250 comprisesfour Reed-Solomon decoding engines 241-244, and a storage 245. When theRandom Number Generator 210 generates data, errors will be deliberatelyinserted by the Error Insertion block 220. This codeword with errorswill be input to the RAID decoder 250, and also input to the SEED pool230, which stores data values identifying each block of the codeword sothat the codeword with errors can be recovered later. As in the priorart, the Random Number Generator 220 generates 32 bits of data, but thedata will not be mirrored. Only the 32 bits generated by the RandomNumber Generator 210 and corresponding to two Reed-Solomon codewords areinput to the RAID decoder 250.

As only half the data is input to the RAID decoder 250, only half of theRS decoding engines 241-244 need to be used. In this embodiment, RSdecoding engines 241 and 242 are illustrated as being used to decode thedata. Further, as the storage 245 only needs to store syndromescorresponding to two codewords, the parity data needed to decode thecodewords can be stored in the remaining space of the storage 245. It isnoted that only half the parity data as compared to the prior art isrequired because no mirroring has occurred.

As illustrated in FIG. 3, the codeword with errors is initially input tothe two Reed-Solomon decoding engines 241, 242 in the RAID decoder 250,with the output being sent to the storage 245 for updating a syndromerespectively corresponding to each codeword. In a second iteration, thesyndrome and the parity data of the two codewords is input to the RSdecoding engines 241, 242 for generating an updated syndrome, whereinselection of the input data or parity data occurs via a MUX 247. Theparity data and updated syndromes are re-input for a number ofiterations until the syndrome is equal to zero. At this point, a resultcheck can take place.

FIG. 4 illustrates the result check. The SEED pool 230 is used torecover the original codewords with errors, by controlling the RandomNumber Generator 210 to output 32 bits of data corresponding to the twocodewords. The RAID decoder 250 outputs the final updated syndromes ofthe two codewords and both the original codewords with errors and thefinal updated syndromes are sent to a Result Check block 260, where thefinal updated syndromes are used to correct the codewords. As the valuesand locations of the errors are known, it can be determined whether theRAID decoding system 200 has been able to recover the original codeword.

As well as the above-described embodiment, the present inventionprovides a second exemplary embodiment which can reduce the bandwidthand simplify the decoding procedure even more.

A RAID decoding system 500 according to the second embodiment isillustrated in FIG. 5. The RAID decoding system 500 comprises a Random.Number Generator 510, an Error Insertion block 520 and a RAID decoder550. The RAID decoder 550 comprises four RS decoding engines 541-544,and a storage 545. In this embodiment, the Random Number Generator 510only outputs 16 bits, which are then mirrored to create 32 bits of data,or two codewords. The two codewords are input to the Error Insertionblock 520 and the resultant data is then input to the RAID decoder 550without being input to a SEED pool. As the 32 bits of data only have onecorresponding Reed-Solomon symbol (parity data), only half the storagespace used in the first embodiment for storing the parity data isrequired in this second embodiment. The remaining space is used todirectly store one of the codewords with errors. Please note that, asboth codewords are identical, this stored codeword is equivalent to boththe first and second codeword input, respectively, to RS decodingengines 541, 542.

The decoding process is illustrated in FIG. 6. In a first iteration, theinput data (codeword with errors) is input to the RS decoding engines541, 542 and used to generate the syndromes for the codewords, whichwill be identical to each other if both RS decoding engines areoperating correctly. In a next iteration, the parity is directly inputto the two RS decoders 541, 542 via a MUX 547, but the parity is firstmirrored before being input. The syndromes are updated accordingly,wherein if both RS decoders are functioning normally, the syndromesshould be the same. When the updated syndrome is equal to zero, thisindicates that the errors can be corrected, and the final updatedsyndrome is used to perform ECC on the codewords.

In this embodiment, the RAID decoder 550 stores both the correctedcodewords and the original codeword with errors. Therefore, all thesevalues can be directly output to the Result Check module 260 forconfirming that all errors have been located and corrected.

The above invention therefore provides two embodiments of functionalBIST for a RAID decoder, wherein the bandwidth is reduced as compared tothe prior art, and no external storage is required.

Those skilled in the art will readily observe that numerousmodifications and alterations of the device and method may be made whileretaining the teachings of the invention. Accordingly, the abovedisclosure should be construed as limited only by the metes and boundsof the appended claims.

What is claimed is:
 1. A RAID decoding system which performs a Built inSelf-Test (BIST), the RAID decoding system comprising: a RAID decoder,comprising: a storage, for storing a syndrome of a first Reed-Solomon(RS) codeword, a syndrome of a second Reed-Solomon (RS) codeword, paritydata of the first RS codeword and parity data of the second RS codeword;and an RS decoder which stores the first RS codeword and the second RScodeword, and performs decoding on the first RS codeword according tothe parity data to generate an updated syndrome of the first RS codewordand performs decoding on the second RS codeword according to the paritydata to generate an updated syndrome of the second RS codeword; and aMUX, coupled between the storage and the RS decoder, for inputting thefirst RS codeword and the second RS codeword to the RS decoder in afirst iteration, and for inputting the parity data of the first RScodeword and the parity data of the second codeword to the RS decoder infollowing iterations for respectively updating the syndrome of the firstRS codeword and the syndrome of the second RS codeword; wherein theupdated syndrome of the first RS codeword and the updated syndrome ofthe second RS codeword are used to perform error correction on the firstRS codeword and the second RS codeword to generate an error-correctedfirst RS codeword and an error-corrected second RS codeword.
 2. The RAIDdecoding system of claim 1, wherein the second RS codeword is a mirrorof the first RS codeword so that the parity data of the first RScodeword is equal to the parity data of the second RS codeword, and thestorage only stores the parity data of one of the first RS codeword andthe second RS codeword, and further stores one of the first RS codewordwith errors and the second RS codeword with errors.
 3. The RAID decodingsystem of claim 2, wherein the MUX inputs the parity data of the firstRS codeword and the parity data of the second codeword to the RS decoderby mirroring the parity data stored in the storage.
 4. The RAID decodingsystem of claim 2, further comprising: a Result Check block, coupled tothe RAID decoder, for receiving the one of the first RS codeword witherrors inserted and the second RS codeword with errors inserted and theerror-corrected first RS codeword and the error-corrected second RScodeword, and determining correctness of the data.
 5. The RAID decodingsystem of claim 1, wherein the RS decoder comprises: a first RS decoderfor storing the first RS codeword and for performing decoding on thefirst RS codeword according to the parity data to generate the updatedsyndrome of the first RS codeword; and a second RS decoder for storingthe second RS codeword and for performing decoding on the second RScodeword according to the parity data to generate the updated syndromeof the second RS codeword.
 6. The RAID decoding system of claim 1,further comprising: an Error Insertion block for inserting errors intothe first RS codeword and the second RS codeword.
 7. The RAID decodingsystem of claim 6, further comprising: a Random Number Generator, forgenerating data to the Error Insertion block; and a SEED pool, coupledbetween the Error Insertion block and the Random Number Generator, forstoring values corresponding to the first RS codeword with errorsinserted and the second RS codeword with errors inserted, and usingthose values to control the Random Number Generator to generate thefirst RS codeword with errors inserted and the second RS codeword witherrors inserted when the updated syndrome of the first RS codeword andthe updated syndrome of the second RS codeword both equal zero.
 8. TheRAID decoding system of claim 7, further comprising: a Result Checkblock, coupled to the Random Number Generator and the RAID decoder, forreceiving the first RS codeword with errors inserted and the second RScodeword with errors inserted and the error-corrected first RS codewordand the error-corrected second RS codeword, and determining correctnessof the data.
 9. The RAID decoding system of claim 1, wherein the updatedsyndrome of the first RS codeword and the updated syndrome of the secondRS codeword are used to perform error correction on the first RScodeword and the second RS codeword when the updated syndrome of thefirst RS codeword and the updated syndrome of the second RS codewordboth equal zero.